package org.lanqiao.oa.vo;

import org.springframework.stereotype.Repository;

import java.util.Objects;


public class PermissionVo implements Cloneable{

    private String id;
    private String pId;
    private String name;
    private Boolean checked;

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getpId() {
        return pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "PermissionVo{" +
                "id=" + id +
                ", pId=" + pId +
                ", name='" + name + '\'' +
                '}';
    }

    @Override
    public PermissionVo clone() {
        try {
            return (PermissionVo) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }finally {
            return this;
        }
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PermissionVo that = (PermissionVo) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(pId, that.pId) &&
                Objects.equals(name, that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pId, name);
    }
}
